<?php 
class loads_model extends CI_Model {
        function __construct()
        {
                parent::__construct();        
                $this->load->helper("local");
                $this->load->helper('date');
                $this->load->database();
        } 

//START-----------------Loads-------------------------//              

		function get_all_loads()
        {
			    $this->load->database();
                $query = $this->db->query("select * from loads order by load_no DESC");
				return $query->result();
        }
		
        function getloads_info($code)
        {       $query = $this->db->query ("select * from loads where loads_id='$code'");
				return $query->row();
        }
	
	
	    function getloadInfoByLoadNo($load_no)
        {       $query = $this->db->query ("select * from loads where load_no='$load_no' ");
				return $query->row();
        }
		
//select vl.*,p.profile_id from profile p inner join vendor_loads vl on vl.vendor_id=p.profile_id where vendor_id='$code'
//End-----------------Loads-------------------------//              		

}
?>
